package lq;

import java.util.Scanner;

public class lq2000 {
    public static void main(String[] args) {
        char[] a = new char[3];
        int[] j = new int[3];
        Scanner in = new Scanner(System.in);
        int n, i,m;
        n = in.nextInt();
        for (i = 0; i < n; i++) {
            a[i]=in.next().charAt(0);
            j[i]=a[i];
        }
        for (i=1;i<n;i++){
            if (j[i]<j[i-1]){
                m=j[i];
                j[i]=j[i-1];
                j[i-1]=m;
            }
        }
    }
}
